namespace OasisCiq.Xal
{
    using System;
    using System.Linq;
    
    /// <summary>
    /// A list of types of addresses
    /// </summary>
    public class AddressTypeList : XS.XSNormalizedString
    {
        private static readonly string[] PossibleValues = new[] 
        {
            "Airport",
            "Business",
            "CaravanPark",
            "CommercialPark",
            "CommunityDevelopment",
            "EducationalInstitution",
            "Entertainment",
            "Hospital",
            "Location",
            "Marina",
            "MilitaryBase",
            "OverseasMilitary",
            "Port",
            "Primary",
            "RecreationalPark",
            "Resort",
            "RetirementVillage",
            "Rural",
            "Secondary",
            "ShoppingCentre",
            "SportingCentre",
            "Urban"
        };

        public AddressTypeList(string value)
            : base(value)
        {
            if (!PossibleValues.Contains(value))
            {
                throw new ArgumentOutOfRangeException();
            }
        }
    }
}